# -*- coding: utf-8 -*-
# Copyright 2017-2019 ControlScan, Inc.
#
# This file is part of Cyphon Engine.
#
# Cyphon Engine is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 3 of the License.
#
# Cyphon Engine is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Cyphon Engine. If not, see <http://www.gnu.org/licenses/>.
#
# Generated by Django 1.10.1 on 2017-03-20 16:23
from __future__ import unicode_literals

import django.core.validators
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Pipe',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('api_module', models.CharField(default='handlers', help_text='The module that will handle the API request.', max_length=32, validators=[django.core.validators.RegexValidator('[a-zA-Z_][a-zA-Z0-9_]*', 'Not a valid Python identifier')])),
                ('api_class', models.CharField(help_text='The class that will handle the API request.', max_length=32, validators=[django.core.validators.RegexValidator('[a-zA-Z_][a-zA-Z0-9_]*', 'Not a valid Python identifier')])),
                ('visa_required', models.BooleanField(default=False, help_text='Whether API calls are restricted by a Visa.')),
            ],
        ),
        migrations.CreateModel(
            name='PipeSpecSheet',
            fields=[
                ('pipe', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, related_name='specsheet', serialize=False, to='pipes.Pipe')),
                ('streaming', models.BooleanField(default=False)),
                ('searchterms_limit', models.IntegerField(blank=True, help_text='Maximum number of search terms in a query.', null=True, verbose_name='Search-term limit')),
                ('followees_limit', models.IntegerField(blank=True, help_text='Maximum number of user accounts in a query.', null=True, verbose_name='Followee limit')),
                ('locations_limit', models.IntegerField(blank=True, help_text='Maximum number of user accounts in a query.', null=True, verbose_name='Location limit')),
                ('location_format', models.CharField(choices=[('box', 'Bounding Box'), ('radius', 'Radius')], max_length=6)),
                ('radius_limit_km', models.FloatField(blank=True, help_text='Maximum radius of a search area in kilometers', null=True, verbose_name='Radius limit in km')),
                ('combine_trm_dt', models.BooleanField(default=False, verbose_name='Time frames count toward search-term limit')),
                ('combine_trm_fol', models.BooleanField(default=False, verbose_name='Followees count toward search-term limit')),
                ('combine_trm_loc', models.BooleanField(default=False, verbose_name='Locations count toward search-term limit')),
                ('combine_trm_opr', models.BooleanField(default=False, verbose_name='Logical operators count toward search-term limit')),
                ('accepts_phrases', models.BooleanField(default=True)),
                ('trm_trm_logic', models.CharField(blank=True, choices=[('AND', 'AND'), ('OR', 'OR')], help_text='Operator used to combine search terms.', max_length=6, null=True, verbose_name='Term-Term logic')),
                ('trm_fol_logic', models.CharField(blank=True, choices=[('AND', 'AND'), ('OR', 'OR')], help_text='Operator used to combine search terms and followees.', max_length=6, null=True, verbose_name='Term-Followee logic')),
                ('trm_loc_logic', models.CharField(blank=True, choices=[('AND', 'AND'), ('OR', 'OR')], help_text='Operator used to combine search terms and locations.', max_length=6, null=True, verbose_name='Term-Location logic')),
                ('OR_operator', models.CharField(blank=True, help_text='String used for an "OR" operator, if applicable.', max_length=10, null=True)),
                ('NOT_operator', models.CharField(blank=True, help_text='String used for a "NOT" operator, if applicable.', max_length=10, null=True)),
            ],
        ),
    ]
